Skip to content

Conversation

@simleo
Copy link
Collaborator

@simleo simleo commented Mar 7, 2025

#161 modified the crate reader to consider entities as data entities if linked not just directly from the root data entity's hasPart, but also recursively from the hasPart of another data entity. This leads to problems when hasPart is used on a File to refer to sections of it. For instance, in ml-predict-pipeline-cwltool-runcrate :

{
    "@id": "packed.cwl",
    "@type": ["File", "SoftwareSourceCode", "ComputationalWorkflow", "HowTo"],
    "hasPart": [
        {"@id": "packed.cwl#classify_tumor.cwl"},
        {"@id": "packed.cwl#extract_tissue.cwl"}
    ]
},
{
    "@id": "packed.cwl#classify_tumor.cwl",
    "@type": "SoftwareApplication"
}

"packed.cwl#classify_tumor.cwl" is read in as a data entity. This PR changes ROCrate.__add_parts to consider only hasPart from Dataset entities.

@simleo simleo force-pushed the fix_indirect_data_entities branch from b863097 to 5645db3 Compare March 7, 2025 15:37
@simleo simleo merged commit d1ee55a into ResearchObject:master Mar 10, 2025
25 of 26 checks passed
@simleo simleo deleted the fix_indirect_data_entities branch March 10, 2025 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant